package org.jeecg.modules.demo.mes.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 工单表
 * @Author: jeecg-boot
 * @Date:   2022-11-02
 * @Version: V1.0
 */
@Data
@TableName("mes_work_order")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="mes_work_order对象", description="工单表")
public class MesWorkOrder implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
	/**工单编号*/
	@Excel(name = "工单编号", width = 15)
    @ApiModelProperty(value = "工单编号")
    private String workOrderNumber;
	/**数量*/
	@Excel(name = "数量", width = 15)
    @ApiModelProperty(value = "数量")
    private Integer quantity;
	/**工厂id*/
	@Excel(name = "工厂id", width = 15, dictTable = "mes_base_factory", dicText = "factory_name", dicCode = "id")
	@Dict(dictTable = "mes_base_factory", dicText = "factory_name", dicCode = "id")
    @ApiModelProperty(value = "工厂id")
    private String factoryId;
	/**车间id*/
	@Excel(name = "车间id", width = 15, dictTable = "mes_base_factory", dicText = "factory_name", dicCode = "id")
	@Dict(dictTable = "mes_base_factory", dicText = "factory_name", dicCode = "id")
    @ApiModelProperty(value = "车间id")
    private String workshopId;
	/**产线id*/
	@Excel(name = "产线id", width = 15, dictTable = "mes_base_factory", dicText = "factory_name", dicCode = "id")
	@Dict(dictTable = "mes_base_factory", dicText = "factory_name", dicCode = "id")
    @ApiModelProperty(value = "产线id")
    private String lineId;
	/**开始时间*/
	@Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开始时间")
    private Date startTime;
	/**结束时间*/
	@Excel(name = "结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "结束时间")
    private Date endTime;

    /**工单状态（1未下发，2已下发）*/
    @Excel(name = "工单状态（1未下发，2已下发）", width = 15,  dicCode = "work_order_status")
    @Dict( dicCode = "work_order_status")
    @ApiModelProperty(value = "工单状态（1未下发，2已下发）")
    private String workOrderStatus;

    /**完成状态（1未完成，2已完成）*/
    @Excel(name = "完成状态（1未完成，2已完成）", width = 15,  dicCode = "finish_status")
    @Dict( dicCode = "finish_status")
    @ApiModelProperty(value = "工单状态（1未下发，2已下发）")
    private String finishStatus;

}
